﻿#pragma once

#include "DevicePumpBase.h"
#include <future>

namespace DeviceLayer
{

class DeviceDemoPump : public DevicePumpBase
{
    DECLARE_DYNAMIC_CREATE(DeviceDemoPump)

    std::atomic<int> rpm { 0 };
    std::atomic<bool> working { false };

    std::future<void> startAsyncFuture, stopAsyncFuture;
public:
    DeviceDemoPump();

    virtual bool Start() override;
    virtual bool Stop() override;
    virtual bool IsWorking() override { return working; }
    virtual int GetRPM() override { return rpm; }

    virtual bool InitFromSettingData(const QString& path) override;
    virtual bool QueryData() override;
};

}
